using System;

namespace Metar.NET
{
	/// <summary>
	/// Summary description for ClassPressure.
	/// </summary>
	public class Pressure:WeatherInformation
	{
        public enum UNITS{INHG=0,MMHG,HPA,ATM}
        private double inhg=0;
        private double mmhg=0;
        private double hpa=0;
        private double atm=0;

        public double Inhg
        {
            get
            {
                return this.inhg;
            }
            set
            {
                this.inhg=value;
                this.Hpa=this.inhg/0.02953;
            }
        }
        public double Mmhg
        {
            get
            {
                return this.mmhg;
            }
            set
            {
                this.mmhg=value;
                this.Hpa=this.mmhg/0.75006;
            }
        }
        public double Hpa
        {
            get
            {
                return this.hpa;
            }
            set
            {
                this.hpa=value;
                this.mmhg = this.hpa * 0.75006;
                this.inhg = this.hpa * 0.02953;
                this.atm  = this.hpa * 9.8692e-4;
            }
        }
        public double Atm
        {
            get
            {
                return this.atm;
            }
            set
            {
                this.atm=value;
                this.Hpa=this.atm/9.8692e-4;
            }
        }

		public Pressure()
		{
			//
			// TODO: Add constructor logic here
			//
		}
	}
}
